using ASP;
using HoWave.Common;
using HoWave.Web;
using HoWave.Web.Shop;
using System;
using System.Data;
using System.IO;
using System.Text;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class Web_EditProduct : Shop, IRequiresSessionState
{
	protected ScriptManager ScriptManager1;
	protected Literal LabProductType;
	protected Label ClassName;
	protected HiddenField ClassID;
	protected HtmlGenericControl ClassBarDiv;
	protected HtmlTableRow Rest1;
	protected TextBox ProductName;
	protected HtmlTableRow Tr1;
	protected TextBox KeyWord;
	protected HtmlTableRow Tr2;
	protected Label ImgPath;
	protected HtmlInputHidden Hidden1;
	protected Image showImage1;
	protected HtmlGenericControl previewImage;
	protected FileUpload FileUpload1;
	protected Label Label1;
	protected HtmlInputHidden Hidden2;
	protected Image showImage2;
	protected HtmlGenericControl showviewImage2;
	protected FileUpload FileUpload2;
	protected Label Label3;
	protected HtmlInputHidden Hidden3;
	protected Image showImage3;
	protected HtmlGenericControl showviewImage3;
	protected FileUpload FileUpload3;
	protected Label Label5;
	protected HtmlInputHidden Hidden4;
	protected Image showImage4;
	protected HtmlGenericControl showviewImage4;
	protected FileUpload FileUpload4;
	protected HtmlInputHidden Hidden5;
	protected Image showImage5;
	protected HtmlGenericControl showviewImage5;
	protected FileUpload FileUpload5;
	protected HtmlTableRow Tr3;
	protected RadioButtonList proudct_video_type;
	protected TextBox Product_VideoUrl;
	protected RegularExpressionValidator RegularExpressionValidator1;
	protected FileUpload FileUploadVideo;
	protected Literal UploadVideoTips;
	protected HtmlTableRow upload_video_tr;
	protected TextBox ProductDescripe;
	protected HtmlTableRow Tr4;
	protected RadioButtonList RadioButtonList_Color;
	protected CheckBoxList CheckBoxList_Color;
	protected HtmlGenericControl ColorDiv;
	protected RadioButtonList RadioButtonList_Size;
	protected HtmlInputText Text_SizeSum;
	protected HtmlGenericControl SizeDiv;
	protected DropDownList DropDownList_Attributes;
	protected Panel AttributesPanel;
	protected HtmlGenericControl AttributesDiv;
	protected UpdatePanel UpdatePanel2;
	protected TextBox TxtPuint;
	protected TextBox ProductStock;
	protected RequiredFieldValidator rfv3;
	protected RangeValidator rav_2;
	protected RadioButtonList ProductStandard;
	protected Shop_UserControls_HowaveProvinceCity ProvinceCity;
	protected RadioButtonList NeedInvoice;
	protected TextBox TxtTaxRate;
	protected RequiredFieldValidator RequiredFieldValidator1;
	protected RangeValidator RangeValidator1;
	protected RadioButtonList Guarantee;
	protected HtmlTable table2;
	protected CheckBox CheckBox_Integral;
	protected Panel ShowIntegral;
	protected TextBox CustomPrice;
	protected Panel ShowMarketPrice;
	protected TextBox StandPrice;
	protected RegularExpressionValidator revStandPrice;
	protected RadioButtonList userMemberCard;
	protected HtmlTableRow auctionMemberCard2;
	protected HtmlTable display_productType_1;
	protected TextBox AuctionPrice;
	protected RegularExpressionValidator revAuctionPrice;
	protected TextBox AuctionAddPrice;
	protected RegularExpressionValidator revAuctionAddPrice;
	protected HtmlTable display_productType_2;
	protected TextBox OriginallyPrice;
	protected RegularExpressionValidator revOriginallyPrice;
	protected DropDownList DropTeamNum;
	protected Literal TeamName1;
	protected TextBox TeamNumber1;
	protected TextBox TeamPrice1;
	protected Literal TeamName2;
	protected TextBox TeamNumber2;
	protected TextBox TeamPrice2;
	protected Literal TeamName3;
	protected TextBox TeamNumber3;
	protected TextBox TeamPrice3;
	protected Literal TeamName4;
	protected TextBox TeamNumber4;
	protected TextBox TeamPrice4;
	protected Literal TeamName5;
	protected TextBox TeamNumber5;
	protected TextBox TeamPrice5;
	protected TextBox OrderMoneyPercent;
	protected Label TeamCount_Error;
	protected HtmlGenericControl display_productType_3;
	protected TextBox MarketPrice;
	protected RegularExpressionValidator RegularExpressionValidator2;
	protected TextBox PromotePrice;
	protected RegularExpressionValidator revPromotePrice;
	protected HtmlInputText BeginTimeDay;
	protected DropDownList BeginTimeHour;
	protected DropDownList BeginTimeMM;
	protected HtmlInputText EndTimeDay;
	protected DropDownList EndTimeHour;
	protected DropDownList EndTimeMM;
	protected HtmlGenericControl display_productType_4;
	protected HtmlTable table3;
	protected CheckBoxList CheckBoxList_OnlinePayType;
	protected HtmlTableCell pay_type_obj;
	protected LinkButton LbtPay;
	protected RadioButtonList Radio_DeliverPayType;
	protected RadioButtonList CheckBoxList_DeliverType;
	protected HtmlTableCell deliver_type_obj;
	protected RadioButtonList PromoteSet;
	protected HtmlTable table4;
	protected TextBox TxtDiscount;
	protected RequiredFieldValidator rfv4;
	protected RangeValidator rav_1;
	protected TextBox TxtPresentExp;
	protected RequiredFieldValidator rfv_5;
	protected RangeValidator rav_3;
	protected TextBox TxtPresentPoint;
	protected RequiredFieldValidator rfv_6;
	protected RangeValidator rav_18;
	protected TextBox TxtPresentMoney;
	protected RequiredFieldValidator rfv_7;
	protected RangeValidator rav_4;
	protected TextBox TxtDiscount1;
	protected RequiredFieldValidator rfv_8;
	protected RangeValidator rav_6;
	protected TextBox TxtPresentExp1;
	protected RequiredFieldValidator rfv_9;
	protected RangeValidator rav_5;
	protected TextBox TxtPresentPoint1;
	protected RequiredFieldValidator rfv_10;
	protected RangeValidator rav_7;
	protected TextBox TxtPresentMoney1;
	protected RequiredFieldValidator rfv_11;
	protected RangeValidator rav_8;
	protected TextBox TxtDiscount2;
	protected RequiredFieldValidator rfv_12;
	protected RangeValidator rav_10;
	protected TextBox TxtPresentExp2;
	protected RequiredFieldValidator rfv_13;
	protected RangeValidator rav_11;
	protected TextBox TxtPresentPoint2;
	protected RequiredFieldValidator rfv_14;
	protected RangeValidator rav_12;
	protected TextBox TxtPresentMoney2;
	protected RequiredFieldValidator rfv_15;
	protected RangeValidator rav_9;
	protected TextBox TxtDiscount3;
	protected RequiredFieldValidator rfv_16;
	protected RangeValidator rav_14;
	protected TextBox TxtPresentExp3;
	protected RequiredFieldValidator Rq7;
	protected RangeValidator Rg15;
	protected TextBox TxtPresentPoint3;
	protected RequiredFieldValidator Rq18;
	protected RangeValidator Rg16;
	protected TextBox TxtPresentMoney3;
	protected RequiredFieldValidator Rq19;
	protected RangeValidator Rg13;
	protected HtmlTable Rest_Table_4;
	protected DropDownList ValidDay;
	protected HtmlTableRow trHavaTime;
	protected RadioButtonList ProductPublishTime;
	protected HtmlInputText PublishStartDay;
	protected DropDownList PublishStartHour;
	protected DropDownList PublishStartMin;
	protected HtmlTableRow trTime;
	protected CheckBox AutoPostBack;
	protected DropDownList TemplateID;
	protected new DropDownList SkinID;
	protected CheckBox IsElite;
	protected TextBox UserRemark;
	protected HtmlTable table5;
	protected UpdatePanel UpdatePanel1;
	protected Button btnUploadPic1;
	protected Button btnUploadPic2;
	protected Button btnUploadPic3;
	protected Button btnUploadPic4;
	protected Button btnUploadPic5;
	protected ListBox listGoods;
	protected TextBox priceBox;
	protected TextBox CountBox;
	protected Button Addright;
	protected Button Addleft;
	protected Label LbError;
	protected ListBox listGet;
	protected UpdatePanel Update3;
	protected HtmlTable SalseZuheTable;
	protected Literal setTeamNum;
	protected Button Button_Submit;
	protected HtmlForm form1;
	protected HtmlGenericControl Html1;
	private string Cs_TeamName = string.Empty;
	private DataRow ProductInfo;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_PreInit(object sender, EventArgs e)
	{
		if (!base.user.CheckUserLogin())
		{
			this.WriteErrMsg("", Language.GetMemberMsg("Common/NotLogin", new string[0]), "Passport/Login.aspx?ComeUrl=" + this.InstallDir + "SaleProduct.aspx");
		}
		try
		{
			Template.BindTemplateToPage(this.Page, "EditProduct");
		}
		catch (Exception ex)
		{
			base.WriteTemErrMsg(ex.Message.ToString());
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		base.ShowCityArea();
		Shop_Product shop_Product = new Shop_Product(this.conn);
		DataTable productByProductID = shop_Product.GetProductByProductID(Fetch.GetID("ProductID"));
		if (productByProductID.Rows.Count > 0 && (int)productByProductID.Rows[0]["SalerID"] == base.user.UserID)
		{
			this.ProductInfo = productByProductID.Rows[0];
		}
		else
		{
			this.WriteErrMsg("", Language.Get("Common/NotData"), "Member/Index.aspx");
		}
		if (!base.IsPostBack)
		{
			this.Initpage();
			this.BindDeliverType();
			this.BindPayType();
			this.ViewState["HtmlTable"] = 0;
			this.ShowMainProduct(int.Parse(Fetch.GetCookies("Howave_UserID")));
			this.ShowPartProduct(Fetch.GetID("ProductID"));
			this.showMoreImage();
			this.priceBox.Text = "0";
			this.CountBox.Text = "0";
			for (int i = 0; i < this.listGoods.Items.Count; i++)
			{
				string[] array = this.listGoods.Items[i].Value.Split(new char[]
				{
					','
				});
				if (this.listGet.Items.Count > 0)
				{
					for (int j = 0; j < this.listGet.Items.Count; j++)
					{
						string[] array2 = this.listGet.Items[j].Value.Split(new char[]
						{
							','
						});
						if (int.Parse(array[0]) == int.Parse(array2[0]))
						{
							this.listGoods.Items.Remove(this.listGoods.Items[i]);
						}
					}
				}
				if (array[0] != "")
				{
					if (Fetch.GetID("ProductID") == int.Parse(array[0]))
					{
						this.listGoods.Items.Remove(this.listGoods.Items[i]);
					}
				}
			}
			this.FileUpload1.Attributes.Add("onchange", "SubmitPicFile('" + this.btnUploadPic1.ClientID + "');");
			this.FileUpload2.Attributes.Add("onchange", "SubmitPicFile('" + this.btnUploadPic2.ClientID + "');");
			this.FileUpload3.Attributes.Add("onchange", "SubmitPicFile('" + this.btnUploadPic3.ClientID + "');");
			this.FileUpload4.Attributes.Add("onchange", "SubmitPicFile('" + this.btnUploadPic4.ClientID + "');");
			this.FileUpload5.Attributes.Add("onchange", "SubmitPicFile('" + this.btnUploadPic5.ClientID + "');");
		}
		this.PublishStartDay.Attributes.Add("onclick", "SelectDate(" + this.PublishStartDay.UniqueID + ",'yyyy/MM/dd');");
		this.BeginTimeDay.Attributes.Add("onclick", "SelectDate(" + this.BeginTimeDay.UniqueID + ",'yyyy/MM/dd');");
		this.EndTimeDay.Attributes.Add("onclick", "SelectDate(" + this.EndTimeDay.UniqueID + ",'yyyy/MM/dd');");
	}
	public void showMoreImage()
	{
		DataSet dataSet = this.conn.GetDataSet("select * from HLShop_ProductImg where ProductID=" + Fetch.GetID("ProductID"));
		if (dataSet != null && !string.IsNullOrEmpty(dataSet.ToString()) && dataSet.Tables[0].Rows.Count > 0)
		{
			if (dataSet.Tables[0].Rows[0]["ImgPath1"] != DBNull.Value && dataSet.Tables[0].Rows[0]["ImgPath1"].ToString() != "")
			{
				this.Hidden1.Value = dataSet.Tables[0].Rows[0]["ImgPath1"].ToString();
				this.showImage1.ImageUrl = dataSet.Tables[0].Rows[0]["ImgPath1"].ToString();
			}
			else
			{
				this.Hidden1.Value = "Images/nopicture.gif";
				this.showImage1.ImageUrl = "Images/nopicture.gif";
			}
			if (dataSet.Tables[0].Rows[0]["ImgPath2"] != DBNull.Value && dataSet.Tables[0].Rows[0]["ImgPath2"].ToString() != "")
			{
				this.Hidden2.Value = dataSet.Tables[0].Rows[0]["ImgPath2"].ToString();
				this.showImage2.ImageUrl = dataSet.Tables[0].Rows[0]["ImgPath2"].ToString();
			}
			else
			{
				this.Hidden2.Value = "Images/nopicture.gif";
				this.showImage2.ImageUrl = "Images/nopicture.gif";
			}
			if (dataSet.Tables[0].Rows[0]["ImgPath3"] != DBNull.Value && dataSet.Tables[0].Rows[0]["ImgPath3"].ToString() != "")
			{
				this.Hidden3.Value = dataSet.Tables[0].Rows[0]["ImgPath3"].ToString();
				this.showImage3.ImageUrl = dataSet.Tables[0].Rows[0]["ImgPath3"].ToString();
			}
			else
			{
				this.Hidden3.Value = "Images/nopicture.gif";
				this.showImage3.ImageUrl = "Images/nopicture.gif";
			}
			if (dataSet.Tables[0].Rows[0]["ImgPath4"] != DBNull.Value && dataSet.Tables[0].Rows[0]["ImgPath4"].ToString() != "")
			{
				this.Hidden4.Value = dataSet.Tables[0].Rows[0]["ImgPath4"].ToString();
				this.showImage4.ImageUrl = dataSet.Tables[0].Rows[0]["ImgPath4"].ToString();
			}
			else
			{
				this.Hidden4.Value = "Images/nopicture.gif";
				this.showImage4.ImageUrl = "Images/nopicture.gif";
			}
			if (dataSet.Tables[0].Rows[0]["ImgPath5"] != DBNull.Value && dataSet.Tables[0].Rows[0]["ImgPath5"].ToString() != "")
			{
				this.Hidden5.Value = dataSet.Tables[0].Rows[0]["ImgPath5"].ToString();
				this.showImage5.ImageUrl = dataSet.Tables[0].Rows[0]["ImgPath5"].ToString();
			}
			else
			{
				this.Hidden5.Value = "Images/nopicture.gif";
				this.showImage5.ImageUrl = "Images/nopicture.gif";
			}
		}
		else
		{
			this.Hidden1.Value = "Images/nopicture.gif";
			this.Hidden2.Value = "Images/nopicture.gif";
			this.Hidden3.Value = "Images/nopicture.gif";
			this.Hidden4.Value = "Images/nopicture.gif";
			this.Hidden5.Value = "Images/nopicture.gif";
			this.showImage1.ImageUrl = "Images/nopicture.gif";
			this.showImage2.ImageUrl = "Images/nopicture.gif";
			this.showImage3.ImageUrl = "Images/nopicture.gif";
			this.showImage4.ImageUrl = "Images/nopicture.gif";
			this.showImage5.ImageUrl = "Images/nopicture.gif";
		}
	}
	protected void btnUploadPic_Click(object sender, EventArgs e)
	{
		string text = this.UploadPicMakeSamllPic();
		base.Response.Write("<script>var a='" + text + "';</script>");
		string text2 = this.Hidden1.Value.Trim();
		if (!string.IsNullOrEmpty(text2))
		{
			File.Delete(base.Server.MapPath("~\\" + text2.Trim(new char[]
			{
				'\\'
			})));
		}
		this.Hidden1.Value = text;
		this.previewImage.InnerHtml = "";
		this.previewImage.InnerHtml = string.Concat(new string[]
		{
			"<img onmousemove=\"var pl=$(this).css('left');var pr=$(this).css('right');$('#DelDiv').show().css('left',pl).css('height',pr);$('#DelDiv').attr('path','",
			text.Trim(new char[]
			{
				'\\',
				'/'
			}),
			"');\" src='",
			text.Trim(new char[]
			{
				'\\',
				'/'
			}),
			"' width='100px' height='100px' border=0>"
		});
	}
	protected void btnUploadPic2_Click(object sender, EventArgs e)
	{
		string text = this.UploadPicMakeSamllPic2();
		string text2 = this.Hidden2.Value.Trim();
		if (!string.IsNullOrEmpty(text2))
		{
			try
			{
				File.Delete(base.Server.MapPath("~\\" + text2.Trim(new char[]
				{
					'\\'
				})));
			}
			catch
			{
			}
		}
		this.Hidden2.Value = text;
		this.showviewImage2.InnerHtml = "";
		this.showviewImage2.InnerHtml = "<img src='" + text.Trim(new char[]
		{
			'\\',
			'/'
		}) + "' width='100px' height='100px' border=0>";
	}
	protected void btnUploadPic3_Click(object sender, EventArgs e)
	{
		string text = this.UploadPicMakeSamllPic3();
		string text2 = this.Hidden3.Value.Trim();
		if (!string.IsNullOrEmpty(text2))
		{
			try
			{
				File.Delete(base.Server.MapPath("~\\" + text2.Trim(new char[]
				{
					'\\'
				})));
			}
			catch
			{
			}
		}
		this.Hidden3.Value = text;
		this.showviewImage3.InnerHtml = "";
		this.showviewImage3.InnerHtml = "<img src='" + text.Trim(new char[]
		{
			'\\',
			'/'
		}) + "' width='100px' height='100px' border=0>";
	}
	protected void btnUploadPic4_Click(object sender, EventArgs e)
	{
		string text = this.UploadPicMakeSamllPic4();
		string text2 = this.Hidden4.Value.Trim();
		if (!string.IsNullOrEmpty(text2))
		{
			try
			{
				File.Delete(base.Server.MapPath("~\\" + text2.Trim(new char[]
				{
					'\\'
				})));
			}
			catch
			{
			}
		}
		this.Hidden4.Value = text;
		this.showviewImage4.InnerHtml = "";
		this.showviewImage4.InnerHtml = "<img src='" + text.Trim(new char[]
		{
			'\\',
			'/'
		}) + "' width='100px' height='100px' border=0>";
	}
	protected void btnUploadPic5_Click(object sender, EventArgs e)
	{
		string text = this.UploadPicMakeSamllPic5();
		string text2 = this.Hidden5.Value.Trim();
		if (!string.IsNullOrEmpty(text2))
		{
			try
			{
				File.Delete(base.Server.MapPath("~\\" + text2.Trim(new char[]
				{
					'\\'
				})));
			}
			catch
			{
			}
		}
		this.Hidden5.Value = text;
		this.showviewImage5.InnerHtml = "";
		this.showviewImage5.InnerHtml = "<img src='" + text.Trim(new char[]
		{
			'\\',
			'/'
		}) + "' width='100px' height='100px' border=0>";
	}
	private string UploadPicMakeSamllPic()
	{
		string result;
		if (this.FileUpload1.HasFile)
		{
			UpLoadFile upLoadFile = new UpLoadFile();
			if (this.FileUpload1.PostedFile.ContentLength > Convert.ToInt32(base.user.GetGroupPower("AllowUploadSize")) * 1024)
			{
				this.WriteErrMsg("", Language.Get("Shop/Product/UpLoadTypeLarget", base.user.GetGroupPower("AllowUploadSize")), "");
			}
			result = upLoadFile.UploadPic(this.FileUpload1, this.config, "");
		}
		else
		{
			result = "";
		}
		return result;
	}
	private string UploadPicMakeSamllPic2()
	{
		string result;
		if (this.FileUpload2.HasFile)
		{
			UpLoadFile upLoadFile = new UpLoadFile();
			if (this.FileUpload2.PostedFile.ContentLength > Convert.ToInt32(base.user.GetGroupPower("AllowUploadSize")) * 1024)
			{
				this.WriteErrMsg("", Language.Get("Shop/Product/UpLoadTypeLarget", base.user.GetGroupPower("AllowUploadSize")), "");
			}
			result = upLoadFile.UploadPic(this.FileUpload2, this.config, "");
		}
		else
		{
			result = "";
		}
		return result;
	}
	private string UploadPicMakeSamllPic3()
	{
		string result;
		if (this.FileUpload3.HasFile)
		{
			UpLoadFile upLoadFile = new UpLoadFile();
			if (this.FileUpload3.PostedFile.ContentLength > Convert.ToInt32(base.user.GetGroupPower("AllowUploadSize")) * 1024)
			{
				this.WriteErrMsg("", Language.Get("Shop/Product/UpLoadTypeLarget", base.user.GetGroupPower("AllowUploadSize")), "");
			}
			result = upLoadFile.UploadPic(this.FileUpload3, this.config, "");
		}
		else
		{
			result = "";
		}
		return result;
	}
	private string UploadPicMakeSamllPic4()
	{
		string result;
		if (this.FileUpload4.HasFile)
		{
			UpLoadFile upLoadFile = new UpLoadFile();
			if (this.FileUpload4.PostedFile.ContentLength > Convert.ToInt32(base.user.GetGroupPower("AllowUploadSize")) * 1024)
			{
				this.WriteErrMsg("", Language.Get("Shop/Product/UpLoadTypeLarget", base.user.GetGroupPower("AllowUploadSize")), "");
			}
			result = upLoadFile.UploadPic(this.FileUpload4, this.config, "");
		}
		else
		{
			result = "";
		}
		return result;
	}
	private string UploadPicMakeSamllPic5()
	{
		string result;
		if (this.FileUpload5.HasFile)
		{
			UpLoadFile upLoadFile = new UpLoadFile();
			if (this.FileUpload5.PostedFile.ContentLength > Convert.ToInt32(base.user.GetGroupPower("AllowUploadSize")) * 1024)
			{
				this.WriteErrMsg("", Language.Get("Shop/Product/UpLoadTypeLarget", base.user.GetGroupPower("AllowUploadSize")), "");
			}
			result = upLoadFile.UploadPic(this.FileUpload5, this.config, "");
		}
		else
		{
			result = "";
		}
		return result;
	}
	public decimal jisuanPart(int ProductID)
	{
		decimal result = 0m;
		Shop_Product shop_Product = new Shop_Product();
		if (shop_Product.ExistProduct(ProductID))
		{
			DataSet partMoney = shop_Product.GetPartMoney(ProductID);
			result = decimal.Parse(partMoney.Tables[0].Rows[0]["Money"].ToString());
		}
		return result;
	}
	public void ShowMainProduct(int UserID)
	{
		Shop_Product shop_Product = new Shop_Product();
		this.listGoods.DataValueField = "GetStrchar";
		this.listGoods.DataTextField = "ProductPrice";
		this.listGoods.DataSource = shop_Product.GetEditSalerProduct(UserID);
		this.listGoods.DataBind();
	}
	public void ShowPartProduct(int ProductID)
	{
		Shop_Product shop_Product = new Shop_Product();
		this.listGet.DataTextField = "SecondaryProName";
		this.listGet.DataValueField = "PartKeys";
		this.listGet.DataSource = shop_Product.GetEditPartProduct(ProductID);
		this.listGet.DataBind();
	}
	protected void Initpage()
	{
		Shop_ProductAttributes shop_ProductAttributes = new Shop_ProductAttributes();
		this.DropDownList_Attributes.DataSource = shop_ProductAttributes.GetAllAttributesType();
		this.DropDownList_Attributes.DataBind();
		this.DropDownList_Attributes.Items.Insert(0, new ListItem("－请选择商品类型－", ""));
		bool flag = false;
		if (this.ProductInfo["EnableSingleSell"].ToString() == "True" || this.ProductInfo["EnableSale"].ToString() == "True" || Convert.ToDateTime(this.ProductInfo["EndDate"]) > DateTime.Now || Convert.ToDateTime(this.ProductInfo["BeginDate"]) < DateTime.Now)
		{
			flag = true;
		}
		if (!flag)
		{
			this.WriteErrMsg("", Language.Get("Shop/Product/CantEdit"), "");
		}
		if (base.shopconfig["Showstandprice"].ToString() != "1")
		{
			if (this.ProductInfo["ProductType"].ToString() == "1")
			{
				this.WriteErrMsg("", Language.Get("Common/Fail", "系统不支持一口价"), "");
			}
		}
		if (base.shopconfig["ShowAction"].ToString() != "1")
		{
			if (this.ProductInfo["ProductType"].ToString() == "2")
			{
				this.WriteErrMsg("", Language.Get("Common/Fail", "系统不支持拍卖"), "");
			}
		}
		if (base.shopconfig["ShowTeam"].ToString() != "1")
		{
			if (this.ProductInfo["ProductType"].ToString() == "3")
			{
				this.WriteErrMsg("", Language.Get("Common/Fail", "系统不支持团购"), "");
			}
		}
		if (base.shopconfig["ShowPromote"].ToString() != "1")
		{
			if (this.ProductInfo["ProductType"].ToString() == "4")
			{
				this.WriteErrMsg("", Language.Get("Common/Fail", "系统不支持秒杀"), "");
			}
		}
		this.LabProductType.Text = TextFormat.GetProductType(this.ProductInfo["ProductType"].ToString());
		this.ClassID.Value = this.ProductInfo["ClassID"].ToString();
		this.ProductName.Text = this.ProductInfo["ProductName"].ToString();
		this.KeyWord.Text = this.ProductInfo["Keyword"].ToString();
		this.ProductDescripe.Text = this.ProductInfo["ProductIntro"].ToString();
		this.MarketPrice.Text = this.ProductInfo["MemberPrice"].ToString();
		string text = this.ProductInfo["UploadFiles"].ToString();
		this.Product_VideoUrl.Text = text;
		this.StandPrice.Text = this.ProductInfo["StandPrice"].ToString();
		this.TxtPuint.Text = this.ProductInfo["PUnit"].ToString();
		this.ProductStock.Text = this.ProductInfo["Stocks"].ToString();
		this.UserRemark.Text = this.ProductInfo["Remark"].ToString();
		this.CustomPrice.Text = this.ProductInfo["CustomPrice"].ToString();
		this.TxtTaxRate.Text = this.ProductInfo["TaxRate"].ToString();
		this.OrderMoneyPercent.Text = this.ProductInfo["TempSubScriptionRate"].ToString();
		this.Radio_DeliverPayType.Text = this.ProductInfo["DeliverPayType"].ToString();
		bool @checked = false;
		try
		{
			@checked = bool.Parse(this.ProductInfo["IntegraUse"].ToString());
		}
		catch (Exception ex)
		{
			ex.WriteErrorLog(new string[]
			{
				"正常数据转换"
			});
			@checked = false;
		}
		this.CheckBox_Integral.Checked = @checked;
		if (this.ProductInfo["ProductType"].ToString() == "2" || this.ProductInfo["ProductType"].ToString() == "3")
		{
			this.SalseZuheTable.Visible = false;
		}
		if (this.ProductInfo["Color"] != null && this.ProductInfo["Color"].ToString() != "")
		{
			this.RadioButtonList_Color.SelectedValue = "1";
			this.ColorDiv.Attributes.Add("style", "");
			string[] array = this.ProductInfo["Color"].ToString().Split(new char[]
			{
				'|'
			});
			string[] array2 = array;
			for (int i = 0; i < array2.Length; i++)
			{
				string value = array2[i];
				this.CheckBoxList_Color.Items.FindByValue(value).Selected = true;
			}
		}
		if (this.ProductInfo["Size"] != null && this.ProductInfo["Size"].ToString() != "")
		{
			this.SizeDiv.Attributes.Add("style", "");
			this.RadioButtonList_Size.SelectedValue = "1";
			this.Text_SizeSum.Value = this.ProductInfo["Size"].ToString() + ",";
		}
		if (this.ProductInfo["ProductSmallImageUrl"] != DBNull.Value)
		{
			if (!string.IsNullOrEmpty(this.ProductInfo["ProductSmallImageUrl"].ToString()))
			{
				this.ImgPath.Text = (this.showImage1.ImageUrl = this.ProductInfo["ProductSmallImageUrl"].ToString());
			}
			else
			{
				this.showImage1.ImageUrl = "/images/nopicture.gif";
			}
		}
		else
		{
			this.showImage1.ImageUrl = "/images/nopicture.gif";
		}
		if (this.ProductInfo["ProductStandard"].ToString() == "1")
		{
			this.ProductStandard.Items[0].Selected = true;
			this.ProductStandard.Items[1].Selected = false;
		}
		else
		{
			this.ProductStandard.Items[1].Selected = true;
			this.ProductStandard.Items[0].Selected = false;
		}
		if (Convert.ToBoolean(this.ProductInfo["NeedInvoice"]))
		{
			this.NeedInvoice.Items[0].Selected = true;
			this.NeedInvoice.Items[1].Selected = false;
		}
		else
		{
			this.NeedInvoice.Items[1].Selected = true;
			this.NeedInvoice.Items[0].Selected = false;
		}
		if (Convert.ToBoolean(this.ProductInfo["Guarantee"]))
		{
			this.Guarantee.Items[0].Selected = true;
			this.Guarantee.Items[1].Selected = false;
		}
		else
		{
			this.Guarantee.Items[1].Selected = true;
			this.Guarantee.Items[0].Selected = false;
		}
		this.IsElite.Checked = Convert.ToBoolean(this.ProductInfo["IsElite"]);
		this.AutoPostBack.Checked = Convert.ToBoolean(this.ProductInfo["AutoPostBack"]);
		string text2 = base.shopconfig["SaleDay"].ToString();
		if (text2.Contains("|"))
		{
			string[] array3 = text2.Split(new char[]
			{
				'|'
			});
			for (int j = 0; j < array3.Length; j++)
			{
				this.ValidDay.Items.Add(array3[j]);
			}
		}
		this.ValidDay.SelectedValue = this.ProductInfo["ValidDay"].ToString();
		if (this.ProductInfo["BeginDate"] != DBNull.Value)
		{
			if (Convert.ToDateTime(this.ProductInfo["BeginDate"]) > DateTime.Now)
			{
				this.ProductPublishTime.Text = "2";
			}
			else
			{
				this.ProductPublishTime.Text = "1";
			}
		}
		else
		{
			if (this.ProductInfo["EnableSingleSell"].ToString() == "True")
			{
				this.ProductPublishTime.Text = "0";
			}
			else
			{
				this.ProductPublishTime.Text = "1";
			}
		}
		this.ProvinceCity.SelectedProvince = this.ProductInfo["Province"].ToString();
		this.ProvinceCity.SelectedCity = this.ProductInfo["City"].ToString();
		this.BindDrList(this.PublishStartHour, ((DateTime)this.ProductInfo["BeginDate"]).Hour.ToString());
		this.BindDrList(this.PublishStartMin, ((DateTime)this.ProductInfo["BeginDate"]).Minute.ToString());
		this.PublishStartDay.Value = ((DateTime)this.ProductInfo["BeginDate"]).ToShortDateString();
		if (this.ProductInfo["ProductType"].ToString() == "1")
		{
			this.display_productType_2.Visible = false;
			this.display_productType_3.Visible = false;
			this.display_productType_4.Visible = false;
		}
		else
		{
			if (this.ProductInfo["ProductType"].ToString() == "2")
			{
				this.display_productType_1.Visible = false;
				this.display_productType_3.Visible = false;
				this.display_productType_4.Visible = false;
				this.AuctionPrice.Text = this.ProductInfo["AuctionStartPrice"].ToString();
				this.AuctionAddPrice.Text = this.ProductInfo["ImcrementPrice"].ToString();
			}
			else
			{
				if (this.ProductInfo["ProductType"].ToString() == "3")
				{
					this.display_productType_1.Visible = false;
					this.display_productType_2.Visible = false;
					this.display_productType_4.Visible = false;
					this.OriginallyPrice.Text = this.ProductInfo["StandPrice"].ToString();
					this.TeamName1.Text = base.shopconfig["Team1Name"].ToString();
					this.TeamName2.Text = base.shopconfig["Team2Name"].ToString();
					this.TeamName3.Text = base.shopconfig["Team3Name"].ToString();
					this.TeamName4.Text = base.shopconfig["Team4Name"].ToString();
					this.TeamName5.Text = base.shopconfig["Team5Name"].ToString();
					int num = Convert.ToInt32(base.shopconfig["TeamSet"]);
					for (int j = 1; j <= num; j++)
					{
						ListItem item = new ListItem(j.ToString(), j.ToString());
						this.DropTeamNum.Items.Add(item);
					}
					this.setTeamNum.Text = "<script language=javascript>setTeamNum(" + this.ProductInfo["TeamNum"] + ");</script>";
					this.TeamNumber1.Text = this.ProductInfo["TeamNumber1"].ToString();
					this.TeamNumber2.Text = this.ProductInfo["TeamNumber2"].ToString();
					this.TeamNumber3.Text = this.ProductInfo["TeamNumber3"].ToString();
					this.TeamNumber4.Text = this.ProductInfo["TeamNumber4"].ToString();
					this.TeamNumber5.Text = this.ProductInfo["TeamNumber5"].ToString();
					this.TeamPrice1.Text = this.ProductInfo["TeamPrice1"].ToString();
					this.TeamPrice2.Text = this.ProductInfo["TeamPrice2"].ToString();
					this.TeamPrice3.Text = this.ProductInfo["TeamPrice3"].ToString();
					this.TeamPrice4.Text = this.ProductInfo["TeamPrice4"].ToString();
					this.TeamPrice5.Text = this.ProductInfo["TeamPrice5"].ToString();
				}
				else
				{
					if (this.ProductInfo["ProductType"].ToString() == "4")
					{
						this.PromotePrice.Text = this.ProductInfo["StandPrice"].ToString();
						this.display_productType_4.Visible = true;
						this.display_productType_1.Visible = false;
						this.display_productType_2.Visible = false;
						this.display_productType_3.Visible = false;
						this.trHavaTime.Visible = false;
						this.trTime.Visible = false;
						this.BeginTimeDay.Value = Convert.ToDateTime(this.ProductInfo["BeginDate"]).ToString("yyyy-MM-dd");
						this.BeginTimeHour.SelectedValue = Convert.ToDateTime(this.ProductInfo["BeginDate"]).Hour.ToString();
						this.BeginTimeMM.SelectedValue = Convert.ToDateTime(this.ProductInfo["BeginDate"]).Minute.ToString();
						this.EndTimeDay.Value = Convert.ToDateTime(this.ProductInfo["EndDate"]).ToString("yyyy-MM-dd");
						this.EndTimeHour.SelectedValue = Convert.ToDateTime(this.ProductInfo["EndDate"]).Hour.ToString();
						this.EndTimeMM.SelectedValue = Convert.ToDateTime(this.ProductInfo["EndDate"]).Minute.ToString();
					}
				}
			}
		}
		if (!base.user.CheckGroupPower("allowpublishmarketprice"))
		{
			this.ShowMarketPrice.Visible = false;
		}
		if (!base.user.CheckGroupPower("allowIntegral"))
		{
			this.ShowIntegral.Visible = false;
		}
	}
	private void BindDrList(DropDownList PublishStartHour, string p)
	{
		foreach (ListItem listItem in PublishStartHour.Items)
		{
			if (listItem.Value.Equals(p))
			{
				listItem.Selected = true;
				break;
			}
		}
	}
	protected void BindDeliverType()
	{
		Shop_DeliverType shop_DeliverType = new Shop_DeliverType(this.conn);
		DataTable deliverTypeByUserIDTypeIDStatus = shop_DeliverType.GetDeliverTypeByUserIDTypeIDStatus(base.user.UserID, -1, 0);
		if (deliverTypeByUserIDTypeIDStatus.Rows.Count > 0)
		{
			bool flag = false;
			this.CheckBoxList_DeliverType.DataSource = deliverTypeByUserIDTypeIDStatus;
			this.CheckBoxList_DeliverType.DataTextField = "typename";
			this.CheckBoxList_DeliverType.DataValueField = "typeid";
			this.CheckBoxList_DeliverType.DataBind();
			foreach (ListItem listItem in this.CheckBoxList_DeliverType.Items)
			{
				if (listItem.Value.Equals(this.ProductInfo["DeliverType"]))
				{
					listItem.Selected = true;
					flag = true;
					break;
				}
			}
			if (!flag)
			{
				this.CheckBoxList_DeliverType.Items[0].Selected = true;
			}
		}
	}
	protected void BindPayType()
	{
		Shop_PayType shop_PayType = new Shop_PayType(this.conn);
		DataTable unDisabledPayTypeByUserID = shop_PayType.GetUnDisabledPayTypeByUserID(base.user.UserID);
		if (unDisabledPayTypeByUserID.Rows.Count > 0)
		{
			this.CheckBoxList_OnlinePayType.DataSource = unDisabledPayTypeByUserID;
			this.CheckBoxList_OnlinePayType.DataTextField = "typename";
			this.CheckBoxList_OnlinePayType.DataValueField = "typeid";
			this.CheckBoxList_OnlinePayType.DataBind();
			string text = this.ProductInfo["PayType"].ToString();
			foreach (ListItem listItem in this.CheckBoxList_OnlinePayType.Items)
			{
				if (text.Contains(listItem.Value))
				{
					listItem.Selected = true;
				}
			}
		}
	}
	protected void Button_Submit_Click(object sender, EventArgs e)
	{
		string color = "";
		if (this.RadioButtonList_Color.SelectedValue == "1")
		{
			string text = "";
			for (int i = 0; i < this.CheckBoxList_Color.Items.Count; i++)
			{
				if (this.CheckBoxList_Color.Items[i].Selected)
				{
					text = text + this.CheckBoxList_Color.Items[i].Value + "|";
				}
			}
			if (text != "")
			{
				color = text.Substring(0, text.Length - 1);
			}
		}
		string size = "";
		if (this.RadioButtonList_Size.SelectedValue == "1")
		{
			size = this.Text_SizeSum.Value.Substring(0, this.Text_SizeSum.Value.Length - 1);
		}
		int num = int.Parse(this.ViewState["HtmlTable"].ToString());
		string text2 = "";
		for (int i = 0; i < num; i++)
		{
			if (base.Request.Form["TextBox_" + i] != null)
			{
				if (base.Request.Form["TextBox_" + i].ToString() != "")
				{
					string text3 = text2;
					text2 = string.Concat(new string[]
					{
						text3,
						"<strong>",
						base.Request.Form["HiddenField_" + i].ToString(),
						"</strong>",
						base.Request.Form["TextBox_" + i].ToString(),
						"|"
					});
				}
			}
			else
			{
				if (base.Request.Form["DropDownList_" + i] != null)
				{
					if (base.Request.Form["DropDownList_" + i].ToString() != "")
					{
						string text3 = text2;
						text2 = string.Concat(new string[]
						{
							text3,
							"<strong>",
							base.Request.Form["HiddenField_" + i].ToString(),
							"</strong>",
							base.Request.Form["DropDownList_" + i].ToString(),
							"|"
						});
					}
				}
				else
				{
					if (base.Request.Form["CheckBoxList_" + i] != null)
					{
						string text4 = base.Request.Form["CheckBoxList_" + i].Replace(",", " / ");
						string text3 = text2;
						text2 = string.Concat(new string[]
						{
							text3,
							"<strong>",
							base.Request.Form["HiddenField_" + i].ToString(),
							"</strong>",
							text4,
							"|"
						});
					}
				}
			}
		}
		if (text2 == "" && this.ProductInfo["Attributes"] != null)
		{
			text2 = this.ProductInfo["Attributes"].ToString();
		}
		if (this.CheckInput())
		{
			string text5 = string.Empty;
			text5 = this.UploadPicMakeSamllPic();
			if (string.IsNullOrEmpty(text5))
			{
				text5 = this.ImgPath.Text;
			}
			if (string.IsNullOrEmpty(text5))
			{
				text5 = this.ProductInfo["ProductSmallImageUrl"].ToString();
			}
			string text6 = "";
			text6 = this.UploadVideo();
			if (string.IsNullOrEmpty(text6))
			{
				text6 = this.Product_VideoUrl.Text;
			}
			if (string.IsNullOrEmpty(text6))
			{
				text6 = this.ProductInfo["UploadFiles"].ToString();
			}
			Shop_Product shop_Product = new Shop_Product(this.conn);
			DateTime dateTime = DateTime.Now;
			if (this.ProductPublishTime.SelectedValue == "2")
			{
				dateTime = Convert.ToDateTime(string.Concat(new string[]
				{
					this.PublishStartDay.Value,
					" ",
					this.PublishStartHour.SelectedValue,
					":",
					this.PublishStartHour.SelectedValue,
					":00"
				}));
			}
			DateTime value = dateTime.AddDays((double)Convert.ToInt32(this.ValidDay.SelectedValue));
			bool value2 = true;
			if (this.ProductPublishTime.SelectedValue == "0")
			{
				value2 = false;
			}
			decimal value3 = Text.ToDecimal(this.StandPrice.Text);
			if (this.ProductInfo["ProductType"].ToString() == "1")
			{
				value3 = Text.ToDecimal(this.StandPrice.Text);
			}
			else
			{
				if (this.ProductInfo["ProductType"].ToString() == "2")
				{
					value3 = Text.ToDecimal(this.AuctionPrice.Text);
					decimal num2 = Convert.ToDecimal(this.ProductInfo["CurrentPrice"]);
				}
				else
				{
					if (this.ProductInfo["ProductType"].ToString() == "3")
					{
						value3 = Text.ToDecimal(this.OriginallyPrice.Text);
						decimal num2 = Convert.ToDecimal(this.ProductInfo["CurrentPrice"]);
					}
					else
					{
						if (this.ProductInfo["ProductType"].ToString() == "4")
						{
							value3 = Text.ToDecimal(this.PromotePrice.Text);
							decimal num2 = Convert.ToDecimal(this.ProductInfo["CurrentPrice"]);
							dateTime = Convert.ToDateTime(string.Concat(new string[]
							{
								this.BeginTimeDay.Value,
								" ",
								this.BeginTimeHour.SelectedValue,
								":",
								this.BeginTimeMM.SelectedValue,
								":00"
							}));
							value = Convert.ToDateTime(string.Concat(new string[]
							{
								this.EndTimeDay.Value,
								" ",
								this.EndTimeHour.SelectedValue,
								":",
								this.EndTimeMM.SelectedValue,
								":00"
							}));
						}
					}
				}
			}
			StringBuilder stringBuilder = new StringBuilder();
			foreach (ListItem listItem in this.CheckBoxList_OnlinePayType.Items)
			{
				if (listItem.Selected)
				{
					stringBuilder.Append(listItem.Value + "|");
				}
			}
			if (stringBuilder.Length > 0)
			{
				stringBuilder.Remove(stringBuilder.Length - 1, 1);
			}
			bool flag = shop_Product.UpdateProduct((int)this.ProductInfo["ProductID"], this.ProvinceCity.SelectedText, new int?(Text.ToInt32(this.ClassID.Value)), this.ProductName.Text, this.ProductStandard.Text, this.ProductDescripe.Text, text5, this.ProductInfo["ProductType"].ToString(), new decimal?(value3), new decimal?(Text.ToDecimal(this.AuctionPrice.Text)), new decimal?(Text.ToDecimal(this.AuctionAddPrice.Text)), new decimal?(Text.ToDecimal(this.MarketPrice.Text)), this.Cs_TeamName, new int?(Text.ToInt32(this.DropTeamNum.SelectedValue)), new decimal?(Text.ToDecimal(this.TeamPrice1.Text)), new decimal?(Text.ToDecimal(this.OrderMoneyPercent.Text)), new int?(Text.ToInt32(this.TeamNumber1.Text)), new decimal?(Text.ToDecimal(this.TeamPrice2.Text)), new int?(Text.ToInt32(this.TeamNumber2.Text)), new decimal?(Text.ToDecimal(this.TeamPrice3.Text)), new int?(Text.ToInt32(this.TeamNumber3.Text)), new decimal?(Text.ToDecimal(this.TeamPrice4.Text)), new int?(Text.ToInt32(this.TeamNumber4.Text)), new decimal?(Text.ToDecimal(this.TeamPrice5.Text)), new int?(Text.ToInt32(this.TeamNumber5.Text)), new bool?(this.IsElite.Checked), new int?(Text.ToInt32(this.ProductStock.Text)), new bool?(Convert.ToBoolean(this.ProductInfo["EnableSale"])), this.CheckBoxList_DeliverType.SelectedValue, "", new bool?(Convert.ToBoolean(this.NeedInvoice.SelectedValue)), new bool?(Convert.ToBoolean(this.Guarantee.SelectedValue)), new int?(Text.ToInt32(this.ValidDay.SelectedValue)), new bool?(this.AutoPostBack.Checked), this.UserRemark.Text, new int?(Convert.ToInt32(this.Radio_DeliverPayType.SelectedValue)), "", stringBuilder.ToString(), new int?(Text.ToInt32(this.TemplateID.SelectedValue)), new int?(Text.ToInt32(this.SkinID.SelectedValue)), new int?(Text.ToInt32(this.TxtDiscount.Text)), new int?(Text.ToInt32(this.TxtPresentExp.Text)), new int?(Text.ToInt32(this.TxtPresentPoint.Text)), new decimal?(Text.ToDecimal(this.TxtPresentMoney.Text)), new int?(Text.ToInt32(this.TxtDiscount1.Text)), new int?(Text.ToInt32(this.TxtPresentExp1.Text)), new int?(Text.ToInt32(this.TxtPresentPoint1.Text)), new decimal?(Text.ToDecimal(this.TxtPresentMoney1.Text)), new int?(Text.ToInt32(this.TxtDiscount2.Text)), new int?(Text.ToInt32(this.TxtPresentExp2.Text)), new int?(Text.ToInt32(this.TxtPresentPoint2.Text)), new decimal?(Text.ToDecimal(this.TxtPresentMoney2.Text)), new int?(Text.ToInt32(this.TxtDiscount3.Text)), new int?(Text.ToInt32(this.TxtPresentExp3.Text)), new int?(Text.ToInt32(this.TxtPresentPoint3.Text)), new decimal?(Text.ToDecimal(this.TxtPresentMoney3.Text)), this.TxtPuint.Text, this.ProductPublishTime.SelectedValue, text5, new decimal?(Text.ToDecimal(this.TxtTaxRate.Text)), new bool?(value2), text6, "", this.KeyWord.Text, new DateTime?(dateTime), new DateTime?(value), this.ProvinceCity.SelectedProvince, this.ProvinceCity.SelectedCity, "", "", "", "", "", "", "", "", "", color, size, text2, this.CustomPrice.Text, this.CheckBox_Integral.Checked);
			if (dateTime != Convert.ToDateTime(this.ProductInfo["BeginDate"]))
			{
				this.conn.Execute("Update HLShop_Product Set Cycle=Cycle+1,CurrentPrice=StandPrice,BuyTimes=0,TeamCurrentNumber1=0,TeamCurrentNumber2=0,TeamCurrentNumber3=0,TeamCurrentNumber4=0,TeamCurrentNumber5=0 Where ProductID=" + this.ProductInfo["ProductID"]);
			}
			Shop_Product shop_Product2 = new Shop_Product();
			int sID = int.Parse(Fetch.GetCookies("Howave_UserID"));
			int iD = Fetch.GetID("ProductID");
			for (int j = 0; j < this.listGet.Items.Count; j++)
			{
				string[] array = this.listGet.Items[j].Value.Split(new char[]
				{
					','
				});
				string[] array2 = this.listGet.Items[j].Text.Split(new char[]
				{
					'￥'
				});
				if (array[1] == null || array[1] == "")
				{
					array[1] = "0";
				}
				if (array[2] == null || array[2] == "")
				{
					array[2] = "0";
				}
				if (!shop_Product2.ExistPart(int.Parse(array[0])))
				{
					shop_Product.AddGroupProduct(sID, iD, int.Parse(array[0]), this.ProductName.Text.ToString(), array2[0], decimal.Parse(array[5]), decimal.Parse(array[2]), array[3], int.Parse(array[6]));
				}
			}
			Shop_Product shop_Product3 = new Shop_Product();
			int num3 = int.Parse(Fetch.GetCookies("Howave_UserID"));
			string[] array3 = new string[]
			{
				this.Hidden1.Value,
				this.Hidden2.Value,
				this.Hidden3.Value,
				this.Hidden4.Value,
				this.Hidden5.Value
			};
			base.Response.Write(string.Concat(new string[]
			{
				"<script>var a = '",
				this.Hidden1.Value,
				this.Hidden2.Value,
				this.Hidden3.Value,
				this.Hidden4.Value,
				this.Hidden5.Value,
				"'</script>"
			}));
			if (shop_Product3.ExistProductImg(iD))
			{
				if (array3[0] != "")
				{
					int num4 = this.conn.Execute(string.Concat(new object[]
					{
						"update HLShop_ProductImg set Imgpath1='",
						array3[0],
						"' where ProductID=",
						iD
					}));
				}
				if (array3[1] != "")
				{
					int num4 = this.conn.Execute(string.Concat(new object[]
					{
						"update HLShop_ProductImg set Imgpath2='",
						array3[1],
						"' where ProductID=",
						iD
					}));
				}
				if (array3[2] != "")
				{
					int num4 = this.conn.Execute(string.Concat(new object[]
					{
						"update HLShop_ProductImg set Imgpath3='",
						array3[2],
						"' where ProductID=",
						iD
					}));
				}
				if (array3[3] != "")
				{
					int num4 = this.conn.Execute(string.Concat(new object[]
					{
						"update HLShop_ProductImg set Imgpath4='",
						array3[3],
						"' where ProductID=",
						iD
					}));
				}
				if (array3[4] != "")
				{
					int num4 = this.conn.Execute(string.Concat(new object[]
					{
						"update HLShop_ProductImg set Imgpath5='",
						array3[4],
						"' where ProductID=",
						iD
					}));
				}
			}
			else
			{
				int num4 = this.conn.Execute(string.Concat(new object[]
				{
					"insert into HLShop_ProductImg(ProductID,SalerID,ImgPath1,ImgPath2,Imgpath3,ImgPath4,ImgPath5) values(",
					iD,
					",",
					num3,
					",'",
					array3[0],
					"','",
					array3[1],
					"','",
					array3[2],
					"','",
					array3[3],
					"','",
					array3[4],
					"')"
				}));
			}
			if (flag)
			{
				this.WriteSuccessMsg("", Language.Get("Shop/Product/OKEdit"), "/ShowProduct.aspx?ProductID=" + this.ProductInfo["ProductID"]);
			}
			else
			{
				this.WriteErrMsg("", Language.Get("Common/Fail", "0"), "");
			}
		}
	}
	private string UploadVideo()
	{
		string result;
		if (this.FileUploadVideo.HasFile)
		{
			int num = Convert.ToInt32(base.user.GetGroupPower("AllowUploadSize")) * 1024;
			UpLoadFile upLoadFile = new UpLoadFile();
			if (this.FileUploadVideo.PostedFile.ContentLength > num)
			{
				this.WriteErrMsg("", Language.Get("Shop/Product/UpLoadTypeLarget", base.user.GetGroupPower("AllowUploadSize")), "");
			}
			string oldfile = this.ProductInfo["UploadFiles"].ToString();
			result = upLoadFile.UploadVideo(this.FileUploadVideo, this.config, oldfile);
		}
		else
		{
			result = "";
		}
		return result;
	}
	public bool CheckInput()
	{
		string text = string.Empty;
		string a = this.ProductInfo["ProductType"].ToString();
		decimal num = 0m;
		if (this.CheckBoxList_DeliverType.SelectedIndex == -1 && this.Radio_DeliverPayType.SelectedValue != "0")
		{
			text = text + Language.Get("Shop/Deliver/DeliverTypeNull") + "<br/>";
		}
		if (this.ClassID.Value == string.Empty)
		{
			text = text + Language.Get("Shop/Product/ClassNull") + "<br/>";
		}
		if (this.ProvinceCity.SelectedText == string.Empty)
		{
			text = text + Language.Get("Shop/Product/ProductNameNull") + "<br/>";
		}
		if (this.TxtPuint.Text == string.Empty)
		{
			text = text + Language.Get("Shop/Product/PuintNull") + "<br/>";
		}
		if (a == string.Empty)
		{
			text = text + Language.Get("Shop/Product/ProductTypeNull") + "<br/>";
		}
		if (!Text.IsNumber(this.ProductStock.Text))
		{
			text = text + Language.Get("Shop/Product/Stock") + "<br/>";
		}
		bool result;
		if (a == "2")
		{
			try
			{
				Convert.ToDecimal(this.AuctionPrice.Text);
				Convert.ToDecimal(this.AuctionAddPrice.Text);
			}
			catch
			{
				text = text + Language.Get("Shop/Product/AuctionPriceErr") + "<br/>";
			}
			if (decimal.Parse(this.AuctionPrice.Text) <= 0m)
			{
				this.Page.ClientScript.RegisterStartupScript(base.GetType(), "Test", "<script>alert('起拍价必须大于0!');</script>");
				result = false;
				return result;
			}
			if (decimal.Parse(this.AuctionAddPrice.Text) <= 0m)
			{
				this.Page.ClientScript.RegisterStartupScript(base.GetType(), "Test", "<script>alert('幅度价必须大于0!');</script>");
				result = false;
				return result;
			}
		}
		else
		{
			if (a == "3")
			{
				try
				{
					Convert.ToDecimal(this.OriginallyPrice.Text);
				}
				catch (Exception ex)
				{
					ex.WriteErrorLog(new string[]
					{
						"正常数据转换"
					});
					this.Page.ClientScript.RegisterStartupScript(base.GetType(), "Test", "<script>alert('商品原价必须大于0!');</script>");
					result = false;
					return result;
				}
				if (decimal.Parse(this.OriginallyPrice.Text) <= 0m)
				{
					this.Page.ClientScript.RegisterStartupScript(base.GetType(), "Test", "<script>alert('商品原价必须大于0!');</script>");
					result = false;
					return result;
				}
				if (this.TeamName1.Text.Trim() == "" || this.TeamName2.Text.Trim() == "" || this.TeamName3.Text.Trim() == "" || this.TeamName4.Text.Trim() == "" || this.TeamName5.Text.Trim() == "")
				{
					text = text + Language.Get("Shop/Product/TeamNameNull") + "<br/>";
				}
				else
				{
					this.Cs_TeamName = string.Concat(new string[]
					{
						this.TeamName1.Text,
						",",
						this.TeamName2.Text,
						",",
						this.TeamName3.Text,
						",",
						this.TeamName4.Text,
						",",
						this.TeamName5.Text
					});
				}
				try
				{
					num = Convert.ToDecimal(this.OriginallyPrice.Text);
					if (num <= 0m)
					{
						text = text + Language.Get("Shop/Product/OriginallyPriceNull") + "<br/>";
					}
				}
				catch
				{
					text = text + Language.Get("Shop/Product/OriginallyPriceErr") + "<br/>";
				}
				try
				{
					Convert.ToDecimal(this.OrderMoneyPercent.Text);
				}
				catch
				{
					text = text + Language.Get("Shop/Product/OrderMoneyPercentErr") + "<br/>";
				}
				int num2 = Convert.ToInt32(this.DropTeamNum.SelectedValue);
				if (num2 >= 1)
				{
					try
					{
						Convert.ToDecimal(this.TeamPrice1.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", this.TeamName1.Text) + "<br/>";
					}
					try
					{
						Convert.ToInt32(this.TeamNumber1.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", this.TeamName1.Text) + "<br/>";
					}
				}
				if (num2 >= 2)
				{
					try
					{
						Convert.ToDecimal(this.TeamPrice2.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", this.TeamPrice2.Text) + "<br/>";
					}
					try
					{
						Convert.ToInt32(this.TeamNumber2.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", this.TeamName2.Text) + "<br/>";
					}
				}
				if (num2 >= 3)
				{
					try
					{
						Convert.ToDecimal(this.TeamPrice3.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", this.TeamPrice3.Text) + "<br/>";
					}
					try
					{
						Convert.ToInt32(this.TeamNumber3.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", this.TeamNumber3.Text) + "<br/>";
					}
				}
				if (num2 >= 4)
				{
					try
					{
						Convert.ToDecimal(this.TeamPrice4.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", this.TeamPrice4.Text) + "<br/>";
					}
					try
					{
						Convert.ToInt32(this.TeamNumber4.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", this.TeamNumber4.Text) + "<br/>";
					}
				}
				if (num2 >= 5)
				{
					try
					{
						Convert.ToDecimal(this.TeamPrice5.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", this.TeamPrice5.Text) + "<br/>";
					}
					try
					{
						Convert.ToInt32(this.TeamNumber5.Text);
					}
					catch
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", this.TeamNumber5.Text) + "<br/>";
					}
				}
				if (Text.ToDecimal(this.TeamNumber1.Text) <= 0m)
				{
					text = text + Language.Get("Shop/Product/TeamNumberErr", this.TeamName1.Text) + "<br/>";
				}
				switch (num2)
				{
				case 1:
					if (Convert.ToDecimal(this.TeamPrice1.Text) >= num)
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", this.TeamName1.Text) + "<br/>";
					}
					if (Convert.ToInt32(this.TeamNumber1.Text) > Convert.ToInt32(this.ProductStock.Text))
					{
						text = text + Language.Get("Shop/Product/StockErr") + "<br/>";
					}
					break;
				case 2:
					if (Text.ToInt32(this.TeamNumber2.Text) <= Text.ToInt32(this.TeamNumber1.Text))
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", this.TeamName2.Text) + "<br/>";
					}
					if (Text.ToDecimal(this.TeamPrice2.Text) >= Text.ToDecimal(this.TeamPrice1.Text) || Text.ToDecimal(this.TeamPrice1.Text) >= num)
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", "") + "<br/>";
					}
					if (Convert.ToInt32(this.TeamNumber2.Text) > Convert.ToInt32(this.ProductStock.Text))
					{
						text = text + Language.Get("Shop/Product/StockErr") + "<br/>";
					}
					break;
				case 3:
					if (Text.ToInt32(this.TeamNumber3.Text) <= Text.ToInt32(this.TeamNumber2.Text) || Text.ToInt32(this.TeamNumber2.Text) <= Text.ToInt32(this.TeamNumber1.Text))
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", "") + "<br/>";
					}
					if (Text.ToDecimal(this.TeamPrice3.Text) >= Text.ToDecimal(this.TeamPrice2.Text) || Text.ToDecimal(this.TeamPrice2.Text) >= Text.ToDecimal(this.TeamPrice1.Text) || Text.ToDecimal(this.TeamPrice1.Text) >= num)
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", "") + "<br/>";
					}
					if (Convert.ToInt32(this.TeamNumber3.Text) > Convert.ToInt32(this.ProductStock.Text))
					{
						text = text + Language.Get("Shop/Product/StockErr") + "<br/>";
					}
					break;
				case 4:
					if (Text.ToInt32(this.TeamNumber4.Text) <= Text.ToInt32(this.TeamNumber3.Text) || Text.ToInt32(this.TeamNumber3.Text) <= Text.ToInt32(this.TeamNumber2.Text) || Text.ToInt32(this.TeamNumber2.Text) <= Text.ToInt32(this.TeamNumber1.Text))
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", "") + "<br/>";
					}
					if (Text.ToDecimal(this.TeamPrice4.Text) >= Text.ToDecimal(this.TeamPrice3.Text) || Text.ToDecimal(this.TeamPrice3.Text) >= Text.ToDecimal(this.TeamPrice2.Text) || Text.ToDecimal(this.TeamPrice2.Text) >= Text.ToDecimal(this.TeamPrice1.Text) || Text.ToDecimal(this.TeamPrice1.Text) >= num)
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", "") + "<br/>";
					}
					if (Convert.ToInt32(this.TeamNumber4.Text) > Convert.ToInt32(this.ProductStock.Text))
					{
						text = text + Language.Get("Shop/Product/StockErr") + "<br/>";
					}
					break;
				case 5:
					if (Text.ToInt32(this.TeamNumber5.Text) <= Text.ToInt32(this.TeamNumber4.Text) || Text.ToInt32(this.TeamNumber4.Text) <= Text.ToInt32(this.TeamNumber3.Text) || Text.ToInt32(this.TeamNumber3.Text) <= Text.ToInt32(this.TeamNumber2.Text) || Text.ToInt32(this.TeamNumber2.Text) <= Text.ToInt32(this.TeamNumber1.Text))
					{
						text = text + Language.Get("Shop/Product/TeamNumberErr", "") + "<br/>";
					}
					if (Text.ToDecimal(this.TeamPrice5.Text) >= Text.ToDecimal(this.TeamPrice4.Text) || Text.ToDecimal(this.TeamPrice4.Text) >= Text.ToDecimal(this.TeamPrice3.Text) || Text.ToDecimal(this.TeamPrice3.Text) >= Text.ToDecimal(this.TeamPrice2.Text) || Text.ToDecimal(this.TeamPrice2.Text) >= Text.ToDecimal(this.TeamPrice1.Text) || Text.ToDecimal(this.TeamPrice1.Text) >= num)
					{
						text = text + Language.Get("Shop/Product/TeamPriceErr", "") + "<br/>";
					}
					if (Convert.ToInt32(this.TeamNumber5.Text) > Convert.ToInt32(this.ProductStock.Text))
					{
						text = text + Language.Get("Shop/Product/StockErr") + "<br/>";
					}
					break;
				}
			}
			else
			{
				try
				{
					Convert.ToDecimal(this.StandPrice.Text);
				}
				catch
				{
					text = text + Language.Get("Shop/Product/StandPriceErr") + "<br/>";
				}
				if (decimal.Parse(this.StandPrice.Text) <= 0m)
				{
					this.Page.ClientScript.RegisterStartupScript(base.GetType(), "Test", "<script>alert('一口价必须大于0!');</script>");
					result = false;
					return result;
				}
			}
		}
		if (text.Trim().Length > 0)
		{
			this.WriteErrMsg("", text, "");
			result = false;
		}
		else
		{
			result = true;
		}
		return result;
	}
	protected void DropDownList_Attributes_SelectedIndexChanged(object sender, EventArgs e)
	{
		this.AttributesDiv.Visible = true;
		if (this.DropDownList_Attributes.SelectedValue == "")
		{
			this.AttributesDiv.Visible = false;
			this.ViewState["HtmlTable"] = 0;
		}
		else
		{
			this.AttributesPanel.Controls.Clear();
			Shop_ProductAttributes shop_ProductAttributes = new Shop_ProductAttributes();
			DataTable attributesNameByAttributesType = shop_ProductAttributes.GetAttributesNameByAttributesType(this.DropDownList_Attributes.SelectedValue);
			HtmlTable htmlTable = new HtmlTable();
			int num = 0;
			foreach (DataRow dataRow in attributesNameByAttributesType.Rows)
			{
				if (dataRow["Attributes_Select"].ToString() != "" || dataRow["Attributes_Select"].ToString() != null)
				{
					HtmlTableCell htmlTableCell = new HtmlTableCell();
					HtmlTableCell htmlTableCell2 = new HtmlTableCell();
					HtmlTableCell htmlTableCell3 = new HtmlTableCell();
					HtmlTableRow htmlTableRow = new HtmlTableRow();
					htmlTableCell.Style.Add("width", "80px");
					htmlTableCell.Style.Add("font-weight", "bold");
					htmlTableCell.Style.Add("text-align", "right");
					htmlTableCell2.Style.Add("text-align", "left");
					Label label = new Label();
					label.ID = "Label_" + num;
					HiddenField hiddenField = new HiddenField();
					hiddenField.ID = "HiddenField_" + num;
					TextBox textBox = new TextBox();
					textBox.ID = "TextBox_" + num;
					textBox.Width = 200;
					if (dataRow["Attributes_Methods"].ToString() == "从列表中选择")
					{
						if (dataRow["Attributes_Value"].ToString() != "")
						{
							label.Text = dataRow["Attributes_Name"].ToString() + "：";
							htmlTableCell.Controls.Add(label);
							hiddenField.Value = dataRow["Attributes_Name"].ToString() + "：";
							htmlTableCell3.Controls.Add(hiddenField);
						}
					}
					else
					{
						label.Text = dataRow["Attributes_Name"].ToString() + "：";
						htmlTableCell.Controls.Add(label);
						hiddenField.Value = dataRow["Attributes_Name"].ToString() + "：";
						htmlTableCell3.Controls.Add(hiddenField);
					}
					htmlTableRow.Controls.Add(htmlTableCell);
					htmlTableRow.Controls.Add(htmlTableCell3);
					if (dataRow["Attributes_Select"].ToString() == "唯一属性")
					{
						string text = dataRow["Attributes_Methods"].ToString();
						if (text != null)
						{
							if (!(text == "手工录入"))
							{
								if (!(text == "从列表中选择"))
								{
									if (text == "多行文本框")
									{
										textBox.TextMode = TextBoxMode.MultiLine;
										textBox.Width = 200;
										textBox.Height = 60;
										htmlTableCell2.Controls.Add(textBox);
									}
								}
								else
								{
									DropDownList dropDownList = new DropDownList();
									dropDownList.ID = "DropDownList_" + num;
									if (dataRow["Attributes_Value"].ToString() != "" && dataRow["Attributes_Value"].ToString() != null)
									{
										string text2 = dataRow["Attributes_Value"].ToString().Replace("\r\n", "|");
										string[] array = text2.Split(new char[]
										{
											'|'
										});
										string[] array2 = array;
										for (int i = 0; i < array2.Length; i++)
										{
											string text3 = array2[i];
											ListItem listItem = new ListItem();
											listItem.Text = text3;
											listItem.Value = text3;
											dropDownList.Items.Add(listItem);
										}
									}
									dropDownList.Items.Insert(0, new ListItem("－请选择－", ""));
									htmlTableCell2.Controls.Add(dropDownList);
								}
							}
							else
							{
								htmlTableCell2.Controls.Add(textBox);
							}
						}
						htmlTableRow.Controls.Add(htmlTableCell2);
						htmlTable.Controls.Add(htmlTableRow);
						this.AttributesPanel.Controls.Add(htmlTable);
					}
					if (dataRow["Attributes_Select"].ToString() == "单选属性")
					{
						string text = dataRow["Attributes_Methods"].ToString();
						if (text != null)
						{
							if (!(text == "手工录入"))
							{
								if (!(text == "从列表中选择"))
								{
									if (text == "多行文本框")
									{
										textBox.TextMode = TextBoxMode.MultiLine;
										textBox.Width = 200;
										textBox.Height = 60;
										htmlTableCell2.Controls.Add(textBox);
									}
								}
								else
								{
									DropDownList dropDownList = new DropDownList();
									dropDownList.ID = "DropDownList_" + num;
									if (dataRow["Attributes_Value"].ToString() != "" && dataRow["Attributes_Value"].ToString() != null)
									{
										string text2 = dataRow["Attributes_Value"].ToString().Replace("\r\n", "|");
										string[] array = text2.Split(new char[]
										{
											'|'
										});
										string[] array2 = array;
										for (int i = 0; i < array2.Length; i++)
										{
											string text3 = array2[i];
											ListItem listItem = new ListItem();
											listItem.Text = text3;
											listItem.Value = text3;
											dropDownList.Items.Add(listItem);
										}
									}
									dropDownList.Items.Insert(0, new ListItem("－请选择－", ""));
									htmlTableCell2.Controls.Add(dropDownList);
								}
							}
							else
							{
								htmlTableCell2.Controls.Add(textBox);
							}
						}
						htmlTableRow.Controls.Add(htmlTableCell2);
						htmlTable.Controls.Add(htmlTableRow);
						this.AttributesPanel.Controls.Add(htmlTable);
					}
					if (dataRow["Attributes_Select"].ToString() == "复选属性")
					{
						string text = dataRow["Attributes_Methods"].ToString();
						if (text != null)
						{
							if (!(text == "手工录入"))
							{
								if (!(text == "从列表中选择"))
								{
									if (text == "多行文本框")
									{
										textBox.TextMode = TextBoxMode.MultiLine;
										textBox.Width = 200;
										textBox.Height = 60;
										htmlTableCell2.Controls.Add(textBox);
									}
								}
								else
								{
									string text4 = "";
									CheckBoxList checkBoxList = new CheckBoxList();
									checkBoxList.ID = "CheckBoxList_" + num;
									if (dataRow["Attributes_Value"].ToString() != "" && dataRow["Attributes_Value"].ToString() != null)
									{
										string text2 = dataRow["Attributes_Value"].ToString().Replace("\r\n", "|");
										string[] array = text2.Split(new char[]
										{
											'|'
										});
										string[] array2 = array;
										for (int i = 0; i < array2.Length; i++)
										{
											string text3 = array2[i];
											ListItem listItem = new ListItem();
											listItem.Text = text3;
											listItem.Value = text3;
											checkBoxList.Items.Add(listItem);
											object obj = text4;
											text4 = string.Concat(new object[]
											{
												obj,
												"<input name='CheckBoxList_",
												num,
												"' type='checkbox'  id='CheckBoxList_",
												num,
												"' value='",
												text3,
												"' >",
												text3,
												"  "
											});
										}
									}
									htmlTableCell2.InnerHtml = text4;
								}
							}
							else
							{
								htmlTableCell2.Controls.Add(textBox);
							}
						}
						htmlTableRow.Controls.Add(htmlTableCell2);
						htmlTable.Controls.Add(htmlTableRow);
						this.AttributesPanel.Controls.Add(htmlTable);
					}
				}
				num++;
			}
			this.ViewState["HtmlTable"] = htmlTable.Controls.Count;
		}
	}
	protected void Addright_Click(object sender, EventArgs e)
	{
		Shop_Product shop_Product = new Shop_Product();
		for (int i = 0; i < this.listGoods.Items.Count; i++)
		{
			if (this.listGoods.Items[i].Selected)
			{
				string[] array = this.listGoods.Items[i].Value.Split(new char[]
				{
					','
				});
				string text = string.Concat(new object[]
				{
					array[0],
					',',
					array[1],
					',',
					array[2],
					',',
					array[3],
					',',
					array[4]
				});
				int num;
				try
				{
					num = int.Parse(this.CountBox.Text);
				}
				catch (Exception ex)
				{
					this.Page.ClientScript.RegisterStartupScript(base.GetType(), "Test", "<script>alert('输入配件数量不是有效数量！');</script>");
					ex.WriteErrorLog(new string[]
					{
						"正常数据转换"
					});
					break;
				}
				if (num > int.Parse(array[4]))
				{
					this.Page.ClientScript.RegisterStartupScript(base.GetType(), "Test", "<script>alert('该商品数只有" + array[4] + "！');</script>");
					break;
				}
				if (shop_Product.ExistPart(int.Parse(array[0])))
				{
					this.LbError.Text = "该配件已被使用";
					break;
				}
				if (array.Length <= 5)
				{
					ListItem expr_1DE = this.listGoods.Items[i];
					object value = expr_1DE.Value;
					expr_1DE.Value = string.Concat(new object[]
					{
						value,
						',',
						this.priceBox.Text,
						',',
						this.CountBox.Text
					});
				}
				else
				{
					this.listGoods.Items[i].Value = string.Concat(new object[]
					{
						text,
						',',
						this.priceBox.Text,
						',',
						this.CountBox.Text
					});
				}
				int num2 = shop_Product.EditMainPartProduct(int.Parse(array[0]), decimal.Parse(this.priceBox.Text));
				this.priceBox.Text = array[1];
				this.listGet.Items.Add(this.listGoods.Items[i]);
				this.listGet.SelectedIndex = -1;
				this.listGoods.Items.Remove(this.listGoods.Items[i]);
			}
		}
	}
	protected void Addleft_Click(object sender, EventArgs e)
	{
		Shop_Product shop_Product = new Shop_Product();
		for (int i = 0; i < this.listGet.Items.Count; i++)
		{
			if (this.listGet.Items[i].Selected)
			{
				string[] array = this.listGet.Items[i].Value.Split(new char[]
				{
					','
				});
				this.priceBox.Text = array[1];
				this.listGoods.Items.Add(this.listGet.Items[i]);
				this.listGoods.SelectedIndex = -1;
				if (shop_Product.ExistPart(int.Parse(array[0])))
				{
					int num = shop_Product.DeletePartProduct(int.Parse(array[0]), Fetch.GetID("ProductID"));
				}
				int num2 = shop_Product.EditMainPartProduct(int.Parse(array[0]), 0m);
				this.listGet.Items.Remove(this.listGet.Items[i]);
			}
		}
	}
	protected void listGoods_SelectedIndexChanged(object sender, EventArgs e)
	{
		this.LbError.Text = "";
		for (int i = 0; i < this.listGoods.Items.Count; i++)
		{
			if (this.listGoods.Items[i].Selected)
			{
				if (this.listGoods.Items[i].Value != "")
				{
					string[] array = this.listGoods.Items[i].Value.Split(new char[]
					{
						','
					});
					this.priceBox.Text = array[1];
					this.CountBox.Text = array[4];
				}
			}
		}
	}
	protected void listGet_SelectedIndexChanged(object sender, EventArgs e)
	{
		this.LbError.Text = "";
		for (int i = 0; i < this.listGet.Items.Count; i++)
		{
			if (this.listGet.Items[i].Selected)
			{
				if (this.listGet.Items[i].Value != "")
				{
					string[] array = this.listGet.Items[i].Value.Split(new char[]
					{
						','
					});
					this.priceBox.Text = array[1];
					this.CountBox.Text = array[4];
				}
			}
		}
	}
	protected void LbtPay_Click(object sender, EventArgs e)
	{
		this.Session["JuseSaleProduct"] = true;
		base.Response.Redirect("/Member/Shop_PaymentType.aspx");
	}
}
